package com.res.share.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 积分明细
 * </p>
 *
 * @author astupidcoder
 * @since 2021-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("res_user_score")
public class ResUserScore extends Model {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    @TableField("USER_ID")
    private Integer userId;

    /**
     * 下载-资源id
     */
    @TableField("ART_ID")
    private Integer artId;

    /**
     * 0-签到 1-下载
     */
    @TableField("TYPE")
    private Integer type;

    /**
     * 积分（签到-1分）
     */
    @TableField("SCORE")
    private Integer score;

    /**
     * 状态 0-未兑换 1-兑换
     */
    @TableField("Status")
    private Integer status;

    /**
     * 获取来源
     */
    @TableField("RES_FROM")
    private String resFrom;

    @TableField("CREATE_USER_ID")
    private Integer createUserId;

    @TableField("CREATE_TIME")
    private Date createTime;

    @TableField("UPDATE_USER_ID")
    private Integer updateUserId;

    @TableField("UPDATE_TIME")
    private Date updateTime;

    @TableLogic(value = "0", delval = "1")
    @TableField("IS_DEL")
    private Integer isDel;

    @TableField(exist = false)
    private String statusName;

}
